package com.ruoyi.common.core.exception;

/**
 * app 系统内部异常
 */
public class AppException extends Exception {

    private static final long serialVersionUID = -994962710559017255L;
    private String message;
    private int status = -1;
    private Object data;

    public AppException(String message) {
        super(message);
        this.message = message;
    }

    public AppException(String message, int status) {
        super(message);
        this.message = message;
        this.status = status;
    }

    public AppException(String message, int status, Object data) {
        super(message);
        this.message = message;
        this.status = status;
        this.data = data;
    }

    public Integer getStatus() {
        return status;
    }

    public Object getData() {
        return data;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
